package com.anlogic.sdk.programflash;

import com.anlogic.sdk.openocd.model.RemoteTarget;

public class ProgramFlashModel {
	public static final String LOCAL_NAME = "Local";
	public static final String LOCALHOST = "localhost";
	public static final String LOCALHOST_IP = "127.0.0.1";
	public static final String PORT = "3333";
	
	private String host = LOCALHOST;
	private String port = PORT;
	
	private String chip;
	private String image;
	private String offset;
	private String type;
	
	private boolean useCustomizeFlash;
	private String bankId;
	private String readCmd;
	private String pprogCmd;
	private String eraseCmd;
	private String pageSize;
	private String sectorSize;
	private String chipSize;
	
	private boolean enablePjtag;
	
	private boolean eraseFlash;
	private boolean enableXip;
	private boolean verify;
	
	private RemoteTarget target;
	
	public boolean isLocal() {
		if (this.host.equals(LOCALHOST) || this.host.equals(LOCALHOST_IP)) {
			return true;
		}
		return false;
	}
	
	public String getHost() {
		return this.host;
	}
	
	public void setHost(String host) {
		this.host = host;
	}
	
	public String getPort() {
		return this.port;
	}
	
	public void setPort(String port) {
		this.port = port;
	}
	
	public String getChip() {
		return this.chip;
	}
	
	public void setChip(String chip) {
		this.chip = chip;
	}
	
	public String getImage() {
		return this.image;
	}
	
	public void setImage(String image) {
		this.image = image;
	}
	
	public String getOffset() {
		return this.offset;
	}
	
	public void setOffset(String offset) {
		this.offset = offset;
	}
	
	public String getType() {
		return this.type;
	}
	
	public void setType(String type) {
		this.type = type;
	}
	
	public boolean getUseCustomizeFlash() {
		return this.useCustomizeFlash;
	}
	
	public void setUseCustomizeFlash(boolean useCustomizeFlash) {
		this.useCustomizeFlash = useCustomizeFlash;
	}
	
	public String getBankId() {
		return this.bankId;
	}
	
	public void setBankId(String bankId) {
		this.bankId = bankId;
	}
	
	public String getReadCmd() {
		return this.readCmd;
	}
	
	public void setReadCmd(String readCmd) {
		this.readCmd = readCmd;
	}
	
	public String getPprogCmd() {
		return this.pprogCmd;
	}
	
	public void setPprogCmd(String pprogCmd) {
		this.pprogCmd = pprogCmd;
	}
	
	public String getEraseCmd() {
		return this.eraseCmd;
	}
	
	public void setEraseCmd(String eraseCmd) {
		this.eraseCmd = eraseCmd;
	}
	
	public String getPageSize() {
		return this.pageSize;
	}
	
	public void setPageSize(String pageSize) {
		this.pageSize = pageSize;
	}
	
	public String getSectorSize() {
		return this.sectorSize;
	}
	
	public void setSectorSize(String sectorSize) {
		this.sectorSize = sectorSize;
	}
	
	public String getChipSize() {
		return this.chipSize;
	}
	
	public void setChipSize(String chipSize) {
		this.chipSize = chipSize;
	}
	
	public boolean getEraseFlash() {
		return this.eraseFlash;
	}
	
	public void setEraseFlash(boolean eraseFlash) {
		this.eraseFlash = eraseFlash;
	}
	
	public boolean getEnableXip() {
		return this.enableXip;
	}
	
	public void setEnableXip(boolean enableXip) {
		this.enableXip = enableXip;
	}
	
	public boolean getEnablePjtag() {
		return this.enablePjtag;
	}
	
	public void setEnablePjtag(boolean enablePjtag) {
		this.enablePjtag = enablePjtag;
	}
	
	public boolean getVerify() {
		return this.verify;
	}
	
	public void setVerify(boolean verify) {
		this.verify = verify;
	}
	
	public RemoteTarget getRemoteTarget() {
		return this.target;
	}
	
	public void setRemoteTarget(RemoteTarget target) {
		this.target = target;
	}
}
